import { useEffect } from 'react'
import 'babel-polyfill'
import { Routes, Route } from 'react-router-dom'
import Home from './pages/home'
import 'antd-mobile-v2/dist/antd-mobile.css'

function App() {
  useEffect(() => {
    initFontSize()
  }, []);

  return <Routes>
    <Route exact path='/' element={<Home />} />
  </Routes>
}

export default App

function initFontSize() {
  const { screen } = window
  const remScale = screen.width / 375
  document.querySelector('html').style.fontSize = String(16 * remScale) + 'px'
}